package com.github.wujichen158.andemusic.proxy;

import com.github.wujichen158.andemusic.aboutconfig.AndeMusicConfig;
import com.github.wujichen158.andemusic.eventsetting.MusicRegister;
import com.github.wujichen158.andemusic.eventsetting.SendPackageEvent;
import com.github.wujichen158.andemusic.network.AndeMusicNetwork;
import com.github.wujichen158.andemusic.playernbt.MusicCapabilityFactory;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.common.event.FMLInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPostInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;

public class CommonProxy {
    @Mod.EventHandler
    public void preinit(FMLPreInitializationEvent event) {
        AndeMusicConfig.init(event);
        MusicCapabilityFactory.registerCap();
        AndeMusicNetwork.registerMessages();
        MinecraftForge.EVENT_BUS.register(new MusicRegister());
    }

    @Mod.EventHandler
    public void init(FMLInitializationEvent event) {
        MinecraftForge.EVENT_BUS.register(new SendPackageEvent());
    }

    @Mod.EventHandler
    public void postinit(FMLPostInitializationEvent event) {
    }
}